﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using VietPublisher.BSL.BK;
using VietPublisher.BaseProject.Models;


namespace VietPublisher.Repositories.Interface
{
    public interface IBookRepository
    {
        /// <summary>
        /// Get All Books !! Use for HomePage
        /// </summary>
        /// <returns></returns>
        List<ListBook> GetBooks();
        /// <summary>
        /// Get a Book by BookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        ViewBook GetBook(int bookID);

        /// <summary>
        /// Get top Books !! Use for HomePage
        /// </summary>
        /// <returns></returns>
        List<ListBook> GetTopBooks(int countSelect);
        

        /// <summary>
        /// Get Book by bookID
        /// </summary>
        /// <param name="bookID"></param>
        /// <returns></returns>
        T_BK_Book GetBookByBookID(int bookID);

        /// <summary>
        /// Get list Book by Booktitle and BookAuthor
        /// </summary>
        /// <param name="BookTitle"></param>
        /// <param name="BookAuthor"></param>
        /// <returns></returns>
        List<T_BK_Book> BookGetList(string BookTitle, string BookAuthor);
       
        /// <summary>
        /// Get list books by CategoryId
        /// </summary>
        /// <param name="categoryId"></param>
        /// <returns></returns>
        List<ListBook> GetBooksByCategoryID(int categoryId);

        /// <summary>
        /// Create a Book
        /// </summary>
        /// <param name="book"></param>
        /// <returns></returns>
        Boolean CreateBook(T_BK_Book book);

        /// <summary>
        /// Update Book Information
        /// </summary>
        /// <param name="book"></param>
        /// <returns></returns>
        int BookUpdate(T_BK_Book book);

        /// <summary>
        /// Delete a Book
        /// </summary>
        /// <param name="BookID"></param>
        /// <returns></returns>
        int BookDelete(int BookID);

        /// <summary>
        /// View description of a book
        /// </summary>
        /// <param name="bookId"></param>
        /// <returns></returns>
        ViewBookDescription ViewBookDescription(int bookId);

        /// <summary>
        /// Get Quantity By BookID
        /// </summary>
        /// <param name="bookId"></param>
        /// <returns></returns>
        int GetQuantityByBookId(int bookId);

        
    }
}
